class Solution:
    def countDigits(self, num: int) -> int:
        ans = 0
        for n in str(num):
            if num != 0 and num % int(n) == 0:
                ans +=1

        return ans
    
class Solution:
    def countDigits(self, num: int) -> int:
        return sum(num % int(n) == 0 for n in str(num))
    
class Solution:
    def countDigits(self,num:int) -> int:
        return sum([1 for n in str(num) if num % int(n) == 0])